home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 151-175 / scopedisk161 / curses / examples / colour / colour.c < prev    next >
C/C++ Source or Header  |  1995-03-19  |  273b  |  21 lines

  1. #include <curses.h>
  2.  
  3. main()
  4. {
  5.     short    colour;
  6.     char buffer[BUFSIZ];
  7.  
  8.     initscr();
  9.  
  10.     for(colour=1;colour<16;colour++) {
  11.         attron(colour);
  12.         move(colour, 30);
  13.         sprintf(buffer, "COLOUR %d", colour);
  14.         addstr(buffer);
  15.     }
  16.     refresh();
  17.  
  18.     Delay(250);    /* Wait 5 secs */
  19.     endwin();
  20. }
  21.